package org.example.myportfolio.config.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 自定义枚举类状态码
 *
 * NoArgsConstructor 无参数构造方法
 * AllArgsConstructor 全参构造方法
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum StatusCode {
    //所有的实例都在最上面
    USERNAME_ERROR(1000, "用户名错误"),
    PASSWORD_ERROR(1001, "密码错误"),
    USERNAME_EXISTS(1002, "用户名被占用"),
    NOT_LOGIN(1003, "未登录"),
    IO_ERROR(1004, "IO异常"),
    OPERATION_SUCCESS(2001, "操作成功"),
    OPERATION_FAILED(2002, "操作失败"),
    THROWABLE_ERROR(6666, "未知异常"),
    VALIDATED_ERROR(8888,"参数校验失败"),
    NULL_POINTER_ERROR(9999, "空指针异常");
    private Integer state;
    private String message;
}








